#include <en_us.h>
#include <adv3.h>
#include <devices.t>

gameMain: GameMainDef
  initialPlayerChar = me
;

versionInfo: GameID
  name = 'bdlibrary test'
  byline = 'by DarknessMonger and Aurelie Catena'
  authorEmail = 'darkness.monger@gmail.com'
  desc = 'bdlibrary tutorial '
  version = '1'
  IFID = 'b8563851-6257-77c3-04ee-278ceaeb48ac'
;

testChamber: Room 'Test Chamber'
  "You are in the room that Darkness designed to test his new bondage equipment.
  It is a vast vaulted hall made of big polygonal stones, with a wide circular pillar in its middle.
  The walls are covered with iron rings and dangling chains. Various torture and bondage devices,
  in different state of completion can be seen. The light comes from a number of oil lanterns
  hanging from the ceiling, while a red glow is coming from the forge chimney. 
  In a corner of the room, a pit has been dug into the concrete floor."
  
  in = pitGrate
  down = pitGrate
;

+pitGrate: Lockable, Door 'grate/grating/grid/pit door' 'grate'
  "A rusty grate. "
;

+ Enterable ->pitGrate 'pit' 'pit' 
  "A pit dug in the floor of the torture chamber. " 
;

;
+handcuffs: Handcuffs 'regular handcuffs' 'regular handcuffs';

+spHandcuffs: Handcuffs 'black handcuffs' 'black handcuffs' 
 notWornDesc = "Special handcuffs as example of having diferent devices of the same class"
;

+rope: HogTie 'hogtie/rope' 'rope'
;

+shackles: AnkleShackles
  desc = "Those are some sturdy, iron shackles for the ankles. They look a bit rusty and must be quite heavy."  
;

+cane: CaneDevice
  desc = "A long rattan cane, useful for hitting someone with it"
;

+shirt: Wearable 'shirt' 'shirt' " shirt"
;

+rack: RackDevice
  desc = "An old wooden rack"
;

+chair: ChairDevice
    desc = "a metal chair full of spikes"
;

+aurelie: DetailedTorturedPerson 'Aurelie/test dummy/pain slut' 'Aurelie'
  "You see a poor, distressed, weak and meagre female. For months she has been used
  as a test dummy for the devices devised in this evil arsenal."
  properName = 'Aurelie'
  isProperName = true
  isHer = true

  tortureReaction(part,device)
  {
    if(part.ofKind(defaultBreastPart))
        "'Don't touch my breasts, you bastard!' she protests.";
    if(part.ofKind(defaultCrotchPart))
    {
      if(device.ofKind(HitDevice))
        "'Nooooooooo! Don't hit my pussy!!!!!' she screams.";
      else
        "'Awwwg! Please stop hurting my pussy!' she protests.";
      setCurState(aurelieBroken);
    }
  }
  
    addPainandDamage(pain,damage)
    {
        //pain received this moment
        if(pain>5)
            "'Oh! that hurts!' she complains.\n";
        accumPain += pain;
        accumDamage += damage;
    }
    reportAccumPain()
        {
        if(accumPain < 20)
            "'Is this all you can do?', she asks.\n";
        if(accumPain > 50)
            "'AAAAaaaah! This is killing meeee!' she screams.\n";
            setCurState(aurelieBroken);
    }
    
    reportAccumDamage(){}
    
    
  tortureFurnitureReaction(device)
  {
    if(device.ofKind(RackDevice))
        "She screams in utter pain, 'Aaaaaagh! My joints are going to pop out! Stooooop thaaaaat!'\n";
  }  
;
++ reactions: ForcedAgenda
;

++ aurelieDefault: ActorState
    isInitState = true
    specialDesc = "Aurelie is here. She seems defiant. "
;

++ aurelieBroken: ActorState
   specialDesc = "Aurelie is broken and will do whatever is asked of her. "

   obeyCommand(issuingActor, action)
   {
        "She obeys << action.name >>";
        return true;
   }
;

+me: DetailedTorturedPerson
  isHim = true
;

pit: Room 'Pit' 'Pit'
  "A cramped, narrow, damp, filthy hole dug
  in the concrete floor of the torture chamber.
  Both the floor and the ceiling are made of a rusty, thick grates."
  
  roomParts = [pitGrate2, pitFloor, pitWall]
  up = testChamber
  out = testChamber
;

+ pitGrate2 : Lockable, Door ->pitGrate 'pit grate' 'pit grate'
  "A rusty grate."
; 

+pitFloor: DefaultWall 'pit floor/floor' 'pit floor'
  "A rusty, filth-encrusted grid."
;

+pitWall: DefaultWall 'pit wall' 'pit wall'
  "Dirty, damp walls roughly dug into the concrete floor of the torture chamber"
;
